package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IWgtsTaskDetailsActivityModel;
import com.wgts.wgts.mvp.model.imp.WgtsTaskDetailsActivityModel;
import com.wgts.wgts.mvp.presenter.IWgtsTaskDetailsActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.WgtsTaskDetailsActivityPresenter;
import com.wgts.wgts.mvp.view.IWgtsTaskDetailsActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 */
@Module
public class WgtsTaskDetailsActivityModule {
    private IWgtsTaskDetailsActivityView view;

    public WgtsTaskDetailsActivityModule(IWgtsTaskDetailsActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IWgtsTaskDetailsActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IWgtsTaskDetailsActivityModel provideModel(NetService netService){
        return new WgtsTaskDetailsActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IWgtsTaskDetailsActivityPresenter providePresenter(IWgtsTaskDetailsActivityView view,
                                                              IWgtsTaskDetailsActivityModel model){
        return new WgtsTaskDetailsActivityPresenter(view, model);
    }
}
